//
//  LiangpinOfIntroduceCell.m
//  HomeIn
//
//  Created by dllo on 15/11/7.
//  Copyright © 2015年 ZZP. All rights reserved.
//

#import "LiangpinOfIntroduceCell.h"
#import "LiangpinDetailModel.h"

@implementation LiangpinOfIntroduceCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    self.webView.delegate = self;
    [self addSubview:self.webView];
    
    //解决webview到边框下拉有灰块
    for (UIScrollView* view in  self.webView.subviews)
    {
        if ([view isKindOfClass:[UIScrollView class]])
        {
            view.bounces = NO;
        }
    }
}

- (void)setLiangpinDetailModel:(LiangpinDetailModel *)liangpinDetailModel
{
    _liangpinDetailModel = liangpinDetailModel;
    
    [self.webView loadHTMLString:_liangpinDetailModel.detail_html baseURL:nil];//加载html
}



@end
